<?php
class AssetUtility
{
    public static function addCss($file)
    {
        $app = Yii::app();
        $file = '/css/'.$file;
        if(file_exists(dirname($app->basePath).$file))
        {
            $app->clientScript->registerCssFile($app->getBaseUrl(true).$file);
        }
    }

    public static function addJs($file)
    {
        $app = Yii::app();
        $file = '/js/'.$file;
        if(file_exists(dirname($app->basePath).$file))
        {
            $app->clientScript->registerScriptFile($app->getBaseUrl(true).$file);
        }
    }
}